home *** CD-ROM | disk | FTP | other *** search
- property infoBox, sendsEvent, cursorGod, objectRect, puzzleGod, pieceType
-
- on mouseEvent me, xEvent, xLoc
- case xEvent of
- #mouseEnter:
- pointCursor(cursorGod)
- #mouseLeave:
- plainCursor(cursorGod)
- #mouseDown:
- newActivePiece(puzzleGod, me)
- #mouseGone:
- plainCursor(cursorGod)
- end case
- end
-
- on areYouThere me, xLoc
- return inside(xLoc, objectRect)
- end
-
- on highlight me
- catchEvent(infoBox, sendsEvent)
- end
-
- on unHighlight me
- nothing()
- end
-
- on getType me
- return pieceType
- end
-
- on new me, xList
- set objectRect to getAt(xList, 1)
- set pieceType to getAt(xList, 2)
- return me
- end
-
- on linkUp me, xPuzzleGod, xInfoBox
- set puzzleGod to xPuzzleGod
- set infoBox to xInfoBox
- set sendsEvent to addThing(infoBox, me)
- end
-
- on subscribe me, xCursor
- if cursorGod = 0 then
- nothing()
- else
- unsubscribe(cursorGod, me)
- end if
- set cursorGod to xCursor
- subscribe(cursorGod, me)
- end
-
- on unsubscribe me
- if cursorGod = 0 then
- nothing()
- else
- unsubscribe(cursorGod, me)
- end if
- end
-
- on destroy me
- unsubscribe(me)
- set me to 0
- end
-